import Vue from 'vue'
import Vuex from 'vuex'



import createPersistedState from "vuex-persistedstate"
import { Num } from "./modules/num"
import { User } from "./modules/user"
import { Cart } from "./modules/cart"
import {detail} from './modules/detail'
import {home} from './modules/home'
import {getters} from './getters'
import {search} from './modules/search'

Vue.use(Vuex)

export default new Vuex.Store({  
  plugins: [createPersistedState({
    storage: window.localStorage,
    key:'store'
  })],


  modules: {
    Num,
    User,
    Cart,
    home,
    detail,
    search
  },
    

  getters
})

